#pragma once

#include "resource.h"
#include "FilterEdit.h"
#include <string>
using namespace std;


class CNewFolderDlg : public CDialogImpl<CNewFolderDlg>, 
					  public CWinDataExchange<CNewFolderDlg>,		 
					  public CUpdateUI<CNewFolderDlg>
{
public:
	enum { IDD = IDD_NEWFOLDERDLG };

	BEGIN_UPDATE_UI_MAP(CNewFolderDlg)
	END_UPDATE_UI_MAP()

	BEGIN_MSG_MAP(CNewFolderDlg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		MESSAGE_HANDLER(WM_CLOSE, OnClose)
		COMMAND_ID_HANDLER(IDC_NEWF_OK, OnOk)
		COMMAND_ID_HANDLER(IDC_NEWF_CANCEL, OnCancel)
	END_MSG_MAP()

	BEGIN_DDX_MAP(CNewFolderDlg)
		DDX_TEXT(IDC_FOLDER_NAME, m_sFolderName)
	END_DDX_MAP()

	CNewFolderDlg(string sParentID);

	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnOk(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnCancel(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

protected:
	CString m_sFolderName;
	CFilterEdit m_fEdit;
	string m_sParentID;
};